/*
 *  Netzpult - Your desk on the web
 *  Copyright (C) 2011  Ulrich Hilger, http://uhilger.de
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see http://www.gnu.org/licenses/
 */

package de.uhilger.netzpult.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import de.uhilger.netzpult.shared.Document;
import de.uhilger.netzpult.shared.Folder;
import de.uhilger.netzpult.shared.GroupShare;
import de.uhilger.netzpult.shared.UserGroup;
import de.uhilger.netzpult.shared.UserShare;

/**
 * 
 * @author Copyright (c) Ulrich Hilger, http://uhilger.de
 * @author Published under the terms and conditions of
 * the <a href="http://www.gnu.org/licenses/" target="_blank">GNU General Public License</a>
 */
public interface OwnerServiceAsync extends BoundTreeServiceAsync {

	void createFolder(Folder folder, AsyncCallback<Folder> callback);


	//void getRootFolders(AsyncCallback<List<Folder>> callback);

	void updateFolder(Folder folder, AsyncCallback<Folder> callback);

	void addToFolder(Folder folder, int documentId,
			AsyncCallback<Void> callback);

	void removeFromFolder(Folder folder, int documentId,
			AsyncCallback<Void> callback);

	void getParameter(String parameterName, AsyncCallback<String> callback);

	void createDocument(Document document, AsyncCallback<Document> callback);

	void saveDraft(Document document, AsyncCallback<Document> callback);


	void getUnfiledDocuments(AsyncCallback<List<Document>> callback);

	void getDocument(String id, AsyncCallback<Document> callback);


	void upFolder(int folderId, AsyncCallback<Integer> callback);


	void downFolder(int folderId, AsyncCallback<Integer> callback);


	void upDocument(int folderId, int documentId, AsyncCallback<Integer> callback);


	void downDocument(int folderId, int documentId,
			AsyncCallback<Integer> callback);


	void getDraftDocuments(AsyncCallback<List<Document>> callback);


	void reindex(AsyncCallback<String> callback);


	void getSharedDocuments(AsyncCallback<List<Document>> callback);


	void moveFolder(Folder folder, int newParentId, AsyncCallback<Folder> callback);


	void getUserShares(int docId, AsyncCallback<List<UserShare>> callback);


	void addUserShare(UserShare share, AsyncCallback<UserShare> callback);


	void updateUserShare(UserShare share, AsyncCallback<UserShare> callback);


	void deleteUserShare(UserShare share, AsyncCallback<UserShare> callback);


	void getGroupShares(int docId, AsyncCallback<List<GroupShare>> callback);


	void addGroupShare(GroupShare share, AsyncCallback<GroupShare> callback);


	void deleteGroupShare(GroupShare share, AsyncCallback<GroupShare> callback);


	void updateGroupShare(GroupShare share, AsyncCallback<GroupShare> callback);


	void getUserGroups(String owner, AsyncCallback<List<UserGroup>> callback);


	void addUserGroup(UserGroup group, AsyncCallback<UserGroup> callback);


	void updateUserGroups(UserGroup group, AsyncCallback<UserGroup> callback);


	void deleteUserGroup(UserGroup group, AsyncCallback<UserGroup> callback);


	void addUserToGroup(int groupId, String userId, AsyncCallback<Void> callback);


	void removeUserFromGroup(int groupId, String userId,
			AsyncCallback<Void> callback);


	void deleteDocument(int docId, AsyncCallback<Integer> callback);




}
